<?php

/** @noinspection PhpMissingFieldTypeInspection */

/** @noinspection PhpMissingDocCommentInspection */
/** @noinspection PhpMissingParamTypeInspection */

namespace DreamCat\Array2Class\Demo;

use DreamCat\Array2Class\Annotation\ObjectAttribute;
use DreamCat\Array2Class\Demo\Inner\Pojo3;
use Dreamcat\PropertyAnalysis\Annotation\ArrayDescAnno;

/**
 * 测试用的示例类1
 * @author vijay
 */
class Pojo1
{
    use SimpleBuilder;

    private Pojo2 $pojo2;
    private $hideInt;
    private $mixed;
    private array $mixedArray;
    /** @var Pojo3[] */
    #[ArrayDescAnno(Pojo3::class)]
    private array $p3s;

    #[ObjectAttribute(ignore: true)]
    private mixed $ignore;

    /**
     * @param Pojo3[] $p3s
     * @return $this
     */
    public function setP3s(array $p3s): Pojo1
    {
        $this->p3s = $p3s;
        return $this;
    }

    public function setPojo2(Pojo2 $pojo2): Pojo1
    {
        $this->pojo2 = $pojo2;
        return $this;
    }

    /**
     * @param array $mixedArray
     */
    public function setMixedArray(array $mixedArray): void
    {
        $this->mixedArray = $mixedArray;
    }

    public function setMixed($mixed): static
    {
        $this->mixed = $mixed;
        return $this;
    }

    /**
     * @param int $int
     */
    public function setHideInt(int $int): void
    {
        $this->hideInt = $int;
    }
}

# end of file
